package com.liting.uitest.model;

import lombok.Data;

@Data
public class ImagePixel {
    private int x;
    private int y;
    private int[] pixels;
    private int blue;
    private int green;
    private int red;

    public ImagePixel(int x, int y) {
        this.x = x;
        this.y = y;

    }

    public ImagePixel(int x, int y, int[] pixels) {
        this.x = x;
        this.y = y;
        this.pixels = pixels;
        this.blue = pixels[0];
        this.green = pixels[1];
        this.red = pixels[2];

    }

    public String toString() {
        StringBuffer buffer = new StringBuffer("coord ").append(this.x).append(",").append(this.y)
                .append("; pixel is ").append(this.blue).append(",").append(this.green).append(",").append(this.red);

        return buffer.toString();
    }
}
